package com.notary.config;


import com.tencentyun.TLSSigAPIv2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author Administrator
 */
@Component
@ConfigurationProperties(prefix = "tencent.rtc")
public class TencentProperties {

    private Long sdkAppId;
    private String secretKey;
    private String signKey;

    public String getSignKey() {
        return signKey;
    }

    public void setSignKey(String signKey) {
        this.signKey = signKey;
    }

    public Long getSdkAppId() {
        return sdkAppId;
    }

    public void setSdkAppId(Long sdkAppId) {
        this.sdkAppId = sdkAppId;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    @Bean
    private TLSSigAPIv2 tlsSigAPIv2(@Autowired TencentProperties tencentProperties) {
        return new TLSSigAPIv2(tencentProperties.getSdkAppId(), tencentProperties.getSecretKey());
    }
}


